package top.codedance.iotp.serialPortSDK.enums;

import top.codedance.iotp.common.util.HexCodec;
import lombok.Getter;

/**
 * @Author 峰
 * @Date 2023/10/25
 * @Version 1.0
 */
@Getter
public enum OsramEnum {
    //场景1
    SCENARIO_1(1, (char) 1),

    //场景2
    SCENARIO_2(2, (char) 2),

    //场景3
    SCENARIO_3(3, (char) 3),

    //场景4
    SCENARIO_4(4, (char) 4),

    //场景5
    SCENARIO_5(5, (char) 5),

    //场景6
    SCENARIO_6(6, (char) 6),

    //场景7
    SCENARIO_7(7, (char) 7),

    //场景8
    SCENARIO_8(8, (char) 8),

    //场景9
    SCENARIO_9(9, (char) 9),

    //场景10
    SCENARIO_10(10, (char) 10),

    //场景11
    SCENARIO_11(11, (char) 11),

    //场景12
    SCENARIO_12(12, (char) 12),

    //场景13
    SCENARIO_13(13, (char) 13),

    //场景14
    SCENARIO_14(14, (char) 14),

    //场景15
    SCENARIO_15(15, (char) 15),

    //场景16
    SCENARIO_16(16, (char) 16),

    //场景17
    SCENARIO_17(17, (char) 17),

    //场景18
    SCENARIO_18(18, (char) 18),

    //场景19
    SCENARIO_19(19, (char) 19),

    //场景20
    SCENARIO_20(20, (char) 20),

    ;

    /**
     * 场景code
     */
    private int code;

    /**
     * 欧司朗弱电控制系统命令 国会
     */
    private char command;


    OsramEnum(int code, char command) {
        this.code = code;
        this.command = command;
    }

    public byte[] getCommandBytes() {
        return new HexCodec().toBytes(String.valueOf(this.command));
    }
}
